package com.semidata.trp.algorithm.http;


import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.http.HttpRequest;

import com.semidata.rtd.core.http.server.DefaultDispatcher;
import com.semidata.rtd.core.http.server.HttpDispatchHandler;
import com.semidata.rtd.core.http.server.UrlMatcher;
import com.semidata.rtd.engine.dynamic.DynamicClassLoader;
import com.semidata.rtd.engine.dynamic.DynamicCompiler;
import com.semidata.trp.algorithm.config.Config;

public class AlgorithmHttpDispatcher extends DefaultDispatcher{
	public AlgorithmHttpDispatcher() {
		Config config = Config.getConfig();
	    addUrlMatcher(new UrlMatcher(config.getAlgorithmUrl()){
	        @Override
	        protected HttpDispatchHandler createHandler(ChannelHandlerContext ctx, HttpRequest request) {
	        	System.out.println("aaaaaaaaaaaaaa");
	            return new AlgorithmHttpHandler(ctx, request);
	        }
	    });
	}
	
}
